home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sol_merge.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  52 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SOL_Merge.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     entered
  13.     
  14.     thing       car         local
  15.     
  16.     surface     offSwitch
  17.     surface     onSwitch
  18.     surface     track
  19.         
  20. end
  21.  
  22. # ========================================================================================
  23. code
  24.  
  25. entered:
  26.  
  27.     car = GetSourceRef();
  28.  
  29.     if(BitTest(GetPhysicsFlags(car), 0x01000000))
  30.     {
  31.         # shut off track
  32.         if(GetSenderRef() == offSwitch)
  33.         {
  34.             Print("Merge: shut off track");
  35.             ClearSurfaceFlags(track, 0x4000);
  36.         }
  37.         
  38.         # turn on track
  39.         if(GetSenderRef() == onSwitch)
  40.         {
  41.             Print("Merge: turn on track");
  42.             SetSurfaceFlags(track, 0x4000);
  43.         }
  44.     }
  45.     
  46.     return;
  47.  
  48. # ========================================================================================
  49.  
  50. end
  51.  
  52.